//导入组件
//登录
import Login from '@/components/Login.vue'
//主页面
import Home from '@/components/homeee.vue'
//打卡
import Clock from '@/components/Clock.vue'
//考勤
// import sp from '@/components/shenpi.vue'
import Attendance from '@/components/Attendance.vue'
//人事
import Personnel from '@/components/Personnel.vue'

//行政
import Administration from '@/components/Administration.vue'

//财务
import Finance from '@/components/Finance.vue'
//工资记录
import Payroll from '@/components/Payroll.vue'

//调薪
import AdjustmentSalary from '@/components/AdjustmentSalary.vue'

//审批
import Approval from '@/components/Approval.vue'
import aaa from '@/components/Approver.vue'
import ApproverHome from '@/components/ApproverHome.vue'

/* 定义路由的数组 */
let routes=[
    {  
        path:'/',
        component:Login,
        hidden:true,
        meta:{
            title:"登录"
        },
    },
    {
        
        path:'/home',
        // name:首页,
        component:Home,
        meta:{
            title:"首页"
        },
        children:[
            {
                path:'/shen',
                // component:Approval,
                meta:{
                    title:"审批管理"
                },
                children:[
                {
                    path: '/sp',
                    component:Approval,
                    meta:{
                        title:"审批类型"
                    }
                }
                ]
            },
            {
                
                path:'/gao',
                component:ApproverHome,
                meta:{
                    title:"公告管理"
                }
            },
            {
                path:'/',
                meta:{
                    title:"考勤管理"
                },
                children:[
                    {
                        path: '/qin',
                        component:Attendance,
                        meta:{
                            title:"考勤"
                        }
                    }
                    ,{
                        path:'/da',
                        component:Clock,
                        meta:{
                            title:"打卡"
                        }
                    }
                ]
            }
        ]
    },
    
]
/* 从vue-router中导入路由对象 */
import {createRouter,createWebHistory} from 'vue-router'
/* 创建路由对象 */
const router = createRouter({
    history:createWebHistory(),
    routes
})
/* 导出路由对象 */
export default router